<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet" />
<script src="assets/js/select2/select2.js"></script>
<div class="row">
    <!-- 映射列表 -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="leftTree">
        <div class="widget flat radius-bordered">
            <div class="widget-header bg-sky theme">
                <span class="widget-caption">收支管理</span>
            </div>
            <div class="widget flat searchCriteria">
                <div class="widget-header bordered-bottom bordered-sky theme-bordered">
                    <span class="widget-caption">筛选区</span>
                    <div class="widget-buttons">
                        <!-- 业务按钮 begin -->
                        <label class="businessBtns">
                            <button class="btn btn-info shiny search"><i class="fa fa-search"></i>搜索</button>
                            <button style="border-radius: 0px" class="btn btn-warning shiny add margin-right-20"
                                    serializeNum="${serializeNum}" editUrl="${addUrl}"><i class="fa fa-plus"></i>新增缴费
                            </button>
                            <button class="btn btn-success shiny" onclick="addPayment()"><i class="fa fa-plus"></i>新增缴费</button>
                            <button class="btn btn-magenta shiny update" serializeNum="${serializeNum}" editUrl="${editUrl}"><i class="fa fa-pencil"></i>修改</button>
                            <button class="btn btn-danger shiny batchDelete" serializeNum="${serializeNum}" batchDeleteUrl="${batchDeleteUrl}"><i class="fa fa-pencil"></i>删除</button>
                            <button class="btn btn-palegreen shiny download"><i class="fa fa-download"></i>导出</button>
                        </label>
                        <!-- 业务按钮 end -->
                        <!-- 面板控制按钮 begin -->
                        <a href="#" data-toggle="collapse"><i class="fa red fa-minus"></i></a>
                        <a href="#" data-toggle="config"><i class="fa red fa-cog"></i></a>
                        <!-- 面板控制按钮 end -->
                    </div><!--Widget Buttons-->
                </div><!--Widget Header-->
                <div class="widget-body" style="display: block;">
                    <div class="search_Bar">
                        <form id="${searchFormId}" action="${actionUrl}" method="POST">
                            <table class="searchAreaTable">
                                <tbody>
                                <tr>
                                    <!-- 条件属性,所有条件放在一行,系统自动计算每一行展示的条件属性个数 -->

                                    <th><label>日期范围</label></th>
                                    <td>
                                        <div class="beginValueDiv">
                                            <input id="d4311" type="text" name="createTime_begin" class="beginValue Wdate" value="${search_map.createTime_begin[0]}"
                                                   onFocus="WdatePicker({doubleCalendar:true,maxDate:'#F{$dp.$D(\'d4312\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="上课日期" >
                                        </div>
                                        <div class="endValueDiv">
                                            <input id="d4312"  type="text" name="createTime_end" class="endValue Wdate"  value="${search_map.createTime_end[0]}"
                                                   onFocus="WdatePicker({doubleCalendar:true,minDate:'#F{$dp.$D(\'d4311\')}',dateFmt:'yyyy-MM-dd HH:mm:ss'})" placeholder="上课日期" >
                                        </div>
                                    </td>
                                    <th><label>考勤状态</label></th>
                                    <td><input type="text" name="attendenceStatus" value="${search_map.attendenceStatus[0]}"></td>
                                    <th><label>授课老师</label></th>
                                    <td><input type="text" name="realName" value="${search_map.realName[0]}"></td>
                                    <th><label>课程名称</label></th>
                                    <td><input type="text" name="courseName" value="${search_map.courseName[0]}"></td>
                                </tr>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div><!--Widget Body-->
            </div><!--Widget-->
            <div class="widget-body no-padding">
                <!--<div class="topPagingBar">
                    ${pagingBar}
                </div>-->
                <div class="table-scrollable">
                    <!-- 数据表列信息列表 -->
                    <table class="table table-bordered dataTable ">
                        <thead>
                        <tr>
                            <th title="选择" class="checkboxColumnTh fixedColumn " >
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" class="chkAll">
                                        <span class="text"></span>
                                    </label>
                                </div>
                            </th>
                            <th title="属性名">序号</th>
                            <th title="课程体系">课程体系</th>
                            <th title="课程名称">课程名称</th>
                            <th title="上课日期">上课日期</th>
                            <th title="上课时间">上课时间</th>
                            <th title="上课教室">上课教室</th>
                            <th title="授课老师">授课老师</th>
                            <th title="消耗课时">消耗课时</th>
                            <th title="考勤状态">考勤状态</th>
                            <th title="考勤备注">考勤备注</th>
                            <th title="当前操作者">操作人</th>
                            <th title="操作日期">操作日期</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#if page_bean.list?size==0>
                            <tr>
                                <td align="center">无数据</td>
                            </tr>
                        </#if>
                        <@dictionary groupCode="attendenceStatus";dics>
                        <#list page_bean.list as data>
                            <tr>
                                <td class="checkboxColumnTd">
                                    <div class="checkbox">
                                        <label>
                                            <input type="checkbox" class="chk"  name="chk" value="${data.id}" createTime="${data.memberCheckAttendanceCreateTime}">
                                            <span class="text"></span>
                                        </label>
                                    </div>
                                </td>
                                <td>${data_index+1+(page_bean.pageNo-1)*page_bean.pageSize}</td>
                                <td>${(data.courseSystemName???string(data.courseSystemName?html,"未设置"))!'未设置'}</td>
                                <td>${(data.courseName???string(data.courseName?html,"未设置"))!'未设置'}
                                <td>${(data.startDate???string(data.startDate?html,"未设置"))!'未设置'}
                                <td>
                                    ${(data.startTime???string(data.startTime?html,"未设置"))!'未设置'}-
                                    ${(data.endTime???string(data.endTime?html,"未设置"))!'未设置'}

                                </td>
                                <td>${(data.roomName???string(data.roomName?html,"未设置"))!'未设置'}
                                </td>
                                <td>
                                    ${(data.realName???string(data.realName?html,"未设置"))!'未设置'}
                                </td>
                                <td>
                                    ${(data.expendClassHour???string(data.expendClassHour?html,"未设置"))!'未设置'}
                                </td>

                                <td>
                                    ${(data.attendenceStatus???string(data.attendenceStatus?html,"无"))!'未设置'}
                                </td>
                                <td>${(data.remark???string(data.remark?html,"未设置"))!'未设置'}</td>
                                <td>${(data.userName???string(data.userName?html,"未设置"))!'未设置'}</td>
                                <td>
                                    ${(data.updateTime???string(data.updateTime?html,"未设置"))!'未设置'}
                                </td>
                            </tr>
                        </#list>
                        </@dictionary>
                        </tbody>
                    </table>
                </div>
                ${pagingBar}
            </div>
        </div>
    </div>
</div>
<script>
    $(".selectpicker").select2();
    /**
     * 新增缴费
     * @param that
     */
    function addPayment(that) {
        var user = "1";
        ajaxRequest("tssPaymentController/toAddedPaymentView.do", {
            user:user
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: "定金",
                className: 'myDialog '
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")
    }
    function Refund(that) {

        var stuId = $(that).attr("stuId");
        console.log(stuId);
        ajaxRequest("tssMemberReturnPremiumController/ViewRefundList.do", {
            stuId: stuId
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: "退费申请",
                className: 'myDialog familyMemberDialog',
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "post", "html")

    }
</script>